﻿
using System ;
using System.Drawing ;
using System.Windows.Forms ;


namespace MskEdit.Msk.Frontend
{

    public class MskLabelAppearance
    {
        #region Private data
        
        private BorderStyle     borderStyle_ ;
        private Font            font_ ;
        private Padding         margin_ ;
        private Padding         padding_ ;
        
        #endregion
        
        #region Public foundation
        
        public static MskLabelAppearance From( Label label ) {
            MskLabelAppearance apperance = new MskLabelAppearance() ;
            apperance.setFrom( label ) ;
            return apperance ;
        }
        
        public MskLabelAppearance() {
        }
        
        #endregion
        
        #region Public operations
        
        public void setFrom( Label label ) {
            borderStyle_    = label.BorderStyle ;
            font_           = label.Font ;
            margin_         = label.Margin ; 
            padding_        = label.Padding ; 
        }
        
        
        public void applyOn( Label label ) {
            label.BorderStyle = borderStyle_;
            label.Font        = font_ ;
            label.Margin      = margin_ ;
            label.Padding     = padding_ ;
        }
        
        #endregion
    }
}
